package com.woniuxy.cloud.carl.carlgoods.client;

import com.woniuxy.cloud.carl.carlgoods.client.dto.CategoryDto;
import com.woniuxy.cloud.carl.carlgoods.client.param.FindSpuByContionParam;
import com.woniuxy.cloud.carl.carlgoods.client.util.MyPage;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "CategoryClient",name="carlgoods")
public interface CategoryClient {

    @GetMapping("/addCategory")
    public Result addCategory(@RequestParam("categoryName") String categoryName);
    @PostMapping("/findCategoryByCondition")
    public Result<MyPage<CategoryDto>> findCategoryByCondition(@RequestBody FindSpuByContionParam param);
    @GetMapping("/listCategory")
    public Result<List<CategoryDto>> listCategory();
}
